import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../common/routes.dart';

class FirstPage extends StatelessWidget {
  const FirstPage({super.key});

  @override
  Widget build(BuildContext context) {
    debugPrint("id = ${Get.parameters['id']} ");
    debugPrint("device = ${Get.parameters['device']} ");
    debugPrint("name = ${Get.parameters['name']} ");

    return Scaffold(
      appBar: AppBar(title: const Text("First Page")),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            TextButton(
                onPressed: () {
                  Get.back();
                },
                child: const Text("返回上一个页面")),
            TextButton(
                onPressed: () {
                  Get.toNamed(Routes.SECOND);
                },
                child: const Text("go second page")),
          ],
        ),
      ),
    );
  }
}
